 package xin.petstore.framework.orm.mybatis.paginator.dialect;
 
 import xin.petstore.framework.orm.mybatis.paginator.domain.PageBounds;
 import org.apache.ibatis.mapping.MappedStatement;
 
 public class MySQLDialect extends Dialect
 {
   public MySQLDialect(MappedStatement mappedStatement, Object parameterObject, PageBounds pageBounds)
   {
     super(mappedStatement, parameterObject, pageBounds);
   }
 
   protected String getLimitString(String sql, String offsetName, int offset, String limitName, int limit) {
     StringBuffer buffer = new StringBuffer(sql.length() + 20).append(sql);
     if (offset > 0) {
       buffer.append(" limit ?, ?");
       setPageParameter(offsetName, Integer.valueOf(offset), Integer.class);
       setPageParameter(limitName, Integer.valueOf(limit), Integer.class);
     } else {
       buffer.append(" limit ?");
       setPageParameter(limitName, Integer.valueOf(limit), Integer.class);
     }
     return buffer.toString();
   }
 }